<template>
    <div>
    <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media"  v-for="items in  newLists" :key="items.id">
					<a href="javascript:;">
						<img class="mui-media-object mui-pull-left" :src="items.img_url">
						<div class="mui-media-body">
							<b>{{items.title}}</b>
							<p class='mui-ellipsis'>最美女兵
                                <span>{{items.add_time}}</span>
                                <span>点击{{items.click}}次</span>
                            </p>
						</div>
					</a>
				</li>
    </ul>            
    </div>
</template>

<script>
export default {
    data(){

     return{
        newLists:[],
     }
    },
    created(){
    this.getNewsList()
    },
    methods:{

        getNewsList(){
          this.$http.get("api/getnewslist").then(result =>{
              //console.log(result)
               if(result.body.status ==0){
                  this.newLists=result.body.message;
               }else{
                   Toast('获取失败');
               }
          })
        }
    },


}
</script>
import { Toast } from 'mint-ui';
<style lang="scss" scoped>
   .mui-ellipsis {
       display: flex;
       justify-content: space-between;
       color: black
   }
</style>
